class CheckQuantityCallback
  def initialize(field_to_check)
    @field_to_check = field_to_check
  end

  def before_save(model)
    if model[@field_to_check] == 0
      model.active = 0
    end
  end
end
